//
//  AppTabbarController.swift
//  HelloSwift
//
//  Created by alankong on 2016/11/17.
//  Copyright © 2016年 tuotiansudai. All rights reserved.
//

import UIKit

class AppTabbarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "主页"
        self.tabBar.tintColor = UIColor.orange
        
        setupViews()
    }
    
    func setupViews() -> Void {
        self.view.backgroundColor = UIColor.white
        let homeVC = HomeVC()
        homeVC.tabBarItem = UITabBarItem(title: "home", image: UIImage(named:"TabbarNewHoneIcon"), selectedImage: UIImage(named:"TabbarNewHoneIconPresed"))
        
        let settingsVC = SettingsVC()
        settingsVC.tabBarItem = UITabBarItem(title: "settings", image: UIImage(named:"TabbarSettingsIcon"), selectedImage: UIImage(named:"TabbarSettingsIconPressed"))
        
        setViewControllers([homeVC, settingsVC], animated: true)
    }
}
